"""
流量监控服务接口
"""
from abc import ABC, abstractmethod
from typing import List, Optional


class IFlowMonitorService(ABC):
    """流量监控服务接口"""
    
    @abstractmethod
    def start_monitoring(self):
        """开始监控"""
        pass
        
    @abstractmethod
    def stop_monitoring(self):
        """停止监控"""
        pass
        
    @abstractmethod
    def add_user(self, username: str):
        """添加用户到待处理队列并更新滑动窗口统计"""
        pass
        
    @abstractmethod
    def get_current_flow_level(self) -> str:
        """获取当前流量等级"""
        pass
        
    @abstractmethod
    def get_last_period_count(self) -> int:
        """获取上一统计周期的用户数"""
        pass 